body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    color: #e74c3c;
    font-size: 24px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    color: #e74c3c;
}

.btn {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-login {
    background-color: transparent;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    margin-right: 10px;
}

.btn-register {
    background-color: #e74c3c;
    color: white;
}

.btn-login:hover {
    background-color: #e74c3c;
    color: white;
}

.btn-register:hover {
    background-color: #c0392b;
}

.page-title {
    margin: 30px 0;
    color: #333;
    text-align: center;
}

.category-container {
    display: flex;
    margin-bottom: 40px;
}

.category-list {
    width: 200px;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-right: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.category-item {
    padding: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.category-item:hover {
    background-color: #f1f1f1;
}

.category-item.active {
    background-color: #e74c3c;
    color: white;
}

.product-list {
    flex: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 18px;
    margin-bottom: 10px;
}

.product-price {
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-stock {
    color: #2ecc71;
    margin-bottom: 10px;
}

.product-created-at {
    color: #777;
    font-size: 14px;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    justify-content: space-between;
}

.view-details {
    background-color: transparent;
    border: none;
    color: #3498db;
    cursor: pointer;
    text-decoration: none;
}

.add-to-cart {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.filter-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter-price {
    margin-bottom: 15px;
}

.filter-price label {
    display: block;
    margin-bottom: 5px;
}

.filter-price input {
    width: 100px;
    margin-right: 10px;
    padding: 5px;
}

#applyFilter {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.sort-options {
    margin-top: 15px;
}

.sort-options label {
    display: block;
    margin-bottom: 5px;
}

.sort-options select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}